# -*- coding: utf-8 -*-
from google.appengine.ext import db
from google.appengine.ext import search


##################################################################################
#                                                                                #
#                       Models                                                   #
#                                                                                #
##################################################################################

class Team(db.Model):
  teamId = db.IntegerProperty()
  name = db.StringProperty()
  slug = db.StringProperty()
  country = db.StringProperty()
  confederation = db.StringProperty()
  genrenumber = db.StringProperty()
  pubDate = db.DateTimeProperty(auto_now_add=True)
  stadium = db.StringProperty()
  theStadium = db.BooleanProperty(default=True)
  city = db.StringProperty()

class Country(db.Model):
  countryId = db.IntegerProperty()
  name = db.StringProperty()
  slug = db.StringProperty()
  code = db.StringProperty()
  confederation = db.StringProperty()

class Match(db.Model):
  matchId = db.IntegerProperty()
  homeTeam = db.StringProperty()
  awayTeam = db.StringProperty()
  teams = db.StringListProperty()
  matchDate = db.DateTimeProperty(auto_now_add=True)
  pubDate = db.DateTimeProperty(auto_now_add=True)
  competition = db.StringProperty()
  season = db.StringProperty()
  phase = db.StringProperty()
  stadium = db.StringProperty()
  confirmed = db.BooleanProperty(default=True)
  confirmedDate = db.BooleanProperty(default=False)
  preComment = db.TextProperty()
  postComment = db.TextProperty()
  score = db.StringProperty()
  homeGoals = db.IntegerProperty()
  awayGoals = db.IntegerProperty()

class CustomUser(db.Model):
  name = db.StringProperty()
  user = db.UserProperty()
  role = db.StringProperty()